Skip to content

fix: drop [triggers] block from backend Pages config#452

Merged
xinyao27 merged 1 commit into
mainfrom
fix/backend-pages-config-triggers
Jul 17, 2026
Merged

fix: drop [triggers] block from backend Pages config#452
xinyao27 merged 1 commit into
mainfrom
fix/backend-pages-config-triggers

Conversation

@xinyao27

Copy link
Copy Markdown
Contributor

wrangler ≥4.9x treats apps/backend/wrangler.toml as a Pages config (it has pages_build_output_dir) and rejects the [triggers] block outright — every wrangler pages deploy fails validation before upload. Found during the first production launch of the share backend.

The block was documentation only (Pages Functions never ran the cron). The cadence stays documented in a comment pointing at workers/spool-share-deletion/wrangler.toml, where the cron actually lives.

Note for a follow-up: the same wrangler versions also require binding id fields in config-based Pages deploys, so pnpm run deploy:staging/prod no longer works with the id-less checked-in config — this launch used local id-carrying configs (wrangler.{staging,prod}.toml, untracked) swapped in at deploy time. Worth deciding whether to script that swap or gitignore the local configs.

wrangler ≥4.9x validates wrangler.toml as a Pages config (it has
pages_build_output_dir) and hard-errors on [triggers]:
"Configuration file for Pages projects does not support 'triggers'" —
every pages deploy fails before upload. The block was documentation
only (Pages Functions never ran the cron); keep the cadence documented
in a comment and point at the deletion worker's own wrangler.toml,
which is where the cron actually lives.
@xinyao27
xinyao27 added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit c1b6991 Jul 17, 2026
5 checks passed
@xinyao27
xinyao27 deleted the fix/backend-pages-config-triggers branch July 17, 2026 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant